<?php
header("Content-type: text/html; charset=utf-8");
	


$s="这个是";

$d="/是/";


$c=preg_match($d, $s);
// preg_match能否匹配
var_dump($c);

$str="dfgddd";
$preg="/^dfg/";
$n=preg_match($preg, $str);
var_dump($n);

//preg_replace 替换


// preg_match_all(pattern, subject, matches);
             // 规则    字符串   匹配输出      


$top="http://www.baidu.com,http://www.sina.com";


$width='/(sina)/';


$ii=preg_replace($width, "<span style='color:red'>新浪</span>", $top);

echo $ii;            

var_dump($_GET);


var_dump($_POST['dd']);



?>